//
//  PayListCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/8/31.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "PayListCell.h"

@implementation PayListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
                
        UIColor *color = ColorFrom16(0xf7f7f7);
        //通过RGB来定义自己的颜色
        self.selectedBackgroundView = [[UIView alloc] initWithFrame:self.frame];
        self.selectedBackgroundView.backgroundColor = color;
    
        
        _wxImg = [UIImageView new];
        _wxImg.image = IMAGE(@"");
        [self addSubview:_wxImg];
        [_wxImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(7);
            make.left.equalTo(self).offset(10);
            make.width.equalTo(@30);
            make.height.equalTo(@30);
        }];
        
        _label = [UILabel new];
        _label.text = @"微信支付";
        _label.textColor = ColorFrom16(0x333333);
        _label.font = PFRFONT(14);
        [self addSubview:_label];
        [_label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(_wxImg.mas_centerY);
            make.left.equalTo(_wxImg.mas_right).offset(10);
            make.width.equalTo(@73.8);
            make.height.equalTo(@20);
        }];
        
        _reminderLabel = [UILabel new];
        _reminderLabel.text = @"送会员专享优惠券";
        _reminderLabel.textColor = ColorFrom16(0xFF5B7A);
        _reminderLabel.hidden = YES;
        _reminderLabel.textAlignment = 1;
        _reminderLabel.layer.borderColor = ColorFrom16(0xFF5B7A).CGColor;
        _reminderLabel.layer.borderWidth = 0.5;
        _reminderLabel.font = PFRFONT(9);
        [self addSubview:_reminderLabel];
        [_reminderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_label.mas_right).offset(10.2);
            make.centerY.equalTo(_wxImg.mas_centerY);
            make.width.equalTo(@100);
            make.height.equalTo(@13);
        }];
        
        UIView *line = [UIView new];
        line.backgroundColor = COLOR_BACKGROUND;
        [self addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self);
            make.left.and.right.equalTo(self);
            make.height.equalTo(@1);
        }];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
